/*
 * Copyright (c) 2017 zhangcm. All Rights Reserved.
 */
package com.jnzc.ocr.serv.shop.api.impl;

import com.jnzc.ocr.serv.shop.api.ShopCountApi;
import com.jnzc.ocr.serv.shop.entity.ShopCountIndex;
import com.jnzc.ocr.serv.shop.entity.ShopCountRevenue;
import com.jnzc.ocr.serv.shop.filter.ShopCountRevenueFilter;
import com.jnzc.ocr.serv.shop.service.ShopCountService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author zhangcm
 * @version 1.0, 2017/10/7
 */
@RestController
public class ShopCountApiImpl implements ShopCountApi {

    @Autowired
    private ShopCountService shopCountService;

    @Override
    public ShopCountRevenue findRevenue(@RequestBody ShopCountRevenueFilter filter) {
        return shopCountService.findRevenue(filter);
    }

    @Override
    public List<ShopCountRevenue> listRevenue(@RequestBody ShopCountRevenueFilter filter) {
        return shopCountService.listRevenue(filter);
    }

    @Override
    public ShopCountIndex countIndex(Long shopId) {
        return shopCountService.countIndex(shopId);
    }
}
